﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ClassTester.FormulaBuilder
{
    public static class FormBuilder
    {
        public static string defaultFormula(string formname,string a1, string a2)
        {
            return string.Format("{0}({1}:{2})", formname, a1, a2);
        }

        public static string IF(string test, string truestr, string falsestr)
        {
            return string.Format("IF({0},{1},{2})", test, truestr, falsestr);
        }

        public static string VAR(string a1, string a2)
        {
            return string.Format("VAR({0}:{1})", a1, a2);
        }
        public static string IFERROR(string a1, string a2="\"\"")
        {
            return string.Format("IFERROR({0},{1})", a1,a2);
        }

        public static string CORREL(string a1, string a2, string b1,string b2)
        {
            return string.Format("CORREL({0}:{1}, {2}:{3})", a1, a2,b1,b2);

        }

        public static string SUM(string a1, string a2)
        {
            return string.Format("SUL({0}:{1})", a1, a2);
        }

        public static string AVERAGE(string a1, string a2, string b1, string b2)
        {
            return string.Format("AVERAGE({0}:{1})", a1, a2);

        }

        public static string STDEV(string a1, string a2)
        {
            return string.Format("STDEV({0}:{1})", a1, a2);
        }

        public static string KURTOSIS(string a1, string a2)
        {
            return string.Format("KURT({0}:{1})", a1, a2);
        }

        public static string MODUS(string a1, string a2)
        {
            return string.Format("MODE({0}:{1})", a1, a2);
        }

        public static string ALS(string test, string truestr, string falsestr)
        {
            return string.Format("IF({0},{1},{2})", test, truestr,falsestr);
        }

        public static string AANTALARG(string a1, string a2)
        {
            return string.Format("COUNTA({0}:{1})", a1, a2);
        }

        public static string MEDIAN(string a1, string a2)
        {
            return string.Format("MEDIAN({0}:{1})", a1, a2);
        }

        public static string SCHEEFHEID(string a1, string a2)
        {
            return string.Format("SKEW({0}:{1})", a1, a2);
        }

        
        
    }
}
